/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2014 Adept Technology

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.40
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.Aria;

public class ArLog {
  /* (begin code from javabody typemap) */

  private long swigCPtr;
  protected boolean swigCMemOwn;

  /* for internal use by swig only */
  public ArLog(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  /* for internal use by swig only */
  public static long getCPtr(ArLog obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  /* (end code from javabody typemap) */

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        AriaJavaJNI.delete_ArLog(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static void log(ArLog.LogLevel level, String str) {
    AriaJavaJNI.ArLog_log(level.swigValue(), str);
  }

  public static boolean init(ArLog.LogType type, ArLog.LogLevel level, String fileName, boolean logTime, boolean alsoPrint, boolean printThisCall) {
    return AriaJavaJNI.ArLog_init__SWIG_0(type.swigValue(), level.swigValue(), fileName, logTime, alsoPrint, printThisCall);
  }

  public static boolean init(ArLog.LogType type, ArLog.LogLevel level, String fileName, boolean logTime, boolean alsoPrint) {
    return AriaJavaJNI.ArLog_init__SWIG_1(type.swigValue(), level.swigValue(), fileName, logTime, alsoPrint);
  }

  public static boolean init(ArLog.LogType type, ArLog.LogLevel level, String fileName, boolean logTime) {
    return AriaJavaJNI.ArLog_init__SWIG_2(type.swigValue(), level.swigValue(), fileName, logTime);
  }

  public static boolean init(ArLog.LogType type, ArLog.LogLevel level, String fileName) {
    return AriaJavaJNI.ArLog_init__SWIG_3(type.swigValue(), level.swigValue(), fileName);
  }

  public static boolean init(ArLog.LogType type, ArLog.LogLevel level) {
    return AriaJavaJNI.ArLog_init__SWIG_4(type.swigValue(), level.swigValue());
  }

  public static void close() {
    AriaJavaJNI.ArLog_close();
  }

  public static void logErrorFromOS(ArLog.LogLevel level, String str) {
    AriaJavaJNI.ArLog_logErrorFromOS(level.swigValue(), str);
  }

  public static void logErrorFromOSPlain(ArLog.LogLevel level, String str) {
    AriaJavaJNI.ArLog_logErrorFromOSPlain(level.swigValue(), str);
  }

  public static void logBacktrace(ArLog.LogLevel level) {
    AriaJavaJNI.ArLog_logBacktrace(level.swigValue());
  }

  public static boolean logFileContents(ArLog.LogLevel level, String fileName) {
    return AriaJavaJNI.ArLog_logFileContents(level.swigValue(), fileName);
  }

  public static void setColbertPrint(SWIGTYPE_p_f_int_p_q_const__char__void value) {
    AriaJavaJNI.ArLog_colbertPrint_set(SWIGTYPE_p_f_int_p_q_const__char__void.getCPtr(value));
  }

  public static SWIGTYPE_p_f_int_p_q_const__char__void getColbertPrint() {
    long cPtr = AriaJavaJNI.ArLog_colbertPrint_get();
    return (cPtr == 0) ? null : new SWIGTYPE_p_f_int_p_q_const__char__void(cPtr, false);
  }

  public static void addToConfig(ArConfig config) {
    AriaJavaJNI.ArLog_addToConfig(ArConfig.getCPtr(config), config);
  }

  public static void aramInit(String prefix, ArLog.LogLevel defaultLevel, double defaultSize, boolean daemonized) {
    AriaJavaJNI.ArLog_aramInit__SWIG_0(prefix, defaultLevel.swigValue(), defaultSize, daemonized);
  }

  public static void aramInit(String prefix, ArLog.LogLevel defaultLevel, double defaultSize) {
    AriaJavaJNI.ArLog_aramInit__SWIG_1(prefix, defaultLevel.swigValue(), defaultSize);
  }

  public static void aramInit(String prefix, ArLog.LogLevel defaultLevel) {
    AriaJavaJNI.ArLog_aramInit__SWIG_2(prefix, defaultLevel.swigValue());
  }

  public static void aramInit(String prefix) {
    AriaJavaJNI.ArLog_aramInit__SWIG_3(prefix);
  }

  public static void setFunctor(ArFunctor1_CString functor) {
    AriaJavaJNI.ArLog_setFunctor(ArFunctor1_CString.getCPtr(functor), functor);
  }

  public static void clearFunctor() {
    AriaJavaJNI.ArLog_clearFunctor();
  }

  public static void internalForceLockup() {
    AriaJavaJNI.ArLog_internalForceLockup();
  }

  public ArLog() {
    this(AriaJavaJNI.new_ArLog(), true);
  }

  public final static class LogType {
    public final static LogType StdOut = new LogType("StdOut");
    public final static LogType StdErr = new LogType("StdErr");
    public final static LogType File = new LogType("File");
    public final static LogType Colbert = new LogType("Colbert");
    public final static LogType None = new LogType("None");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static LogType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + LogType.class + " with value " + swigValue);
    }

    private LogType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private LogType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private LogType(String swigName, LogType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static LogType[] swigValues = { StdOut, StdErr, File, Colbert, None };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class LogLevel {
    public final static LogLevel Terse = new LogLevel("Terse");
    public final static LogLevel Normal = new LogLevel("Normal");
    public final static LogLevel Verbose = new LogLevel("Verbose");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static LogLevel swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + LogLevel.class + " with value " + swigValue);
    }

    private LogLevel(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private LogLevel(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private LogLevel(String swigName, LogLevel swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static LogLevel[] swigValues = { Terse, Normal, Verbose };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
